import 'package:flutter/material.dart';
import 'package:flutter_250303/http/dio_instance.dart';
import 'package:flutter_250303/pages/home/home_page.dart';
import 'package:flutter_250303/route/routes.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:oktoast/oktoast.dart';

void main() {
  DioInstance.instance().initDio();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return OKToast(
        child: ScreenUtilInit(
          designSize: const Size(400, 900),
          builder: (context, child) {
            return MaterialApp(
              title: "flutter rrr",
              theme: ThemeData(colorScheme: ColorScheme.fromSeed(
                  seedColor: Colors.deepPurple), useMaterial3: true),
              onGenerateRoute: Routes.generateRoute,
              initialRoute: RoutePath.tab,
            );
          },
        ));
  }
}